AddCSLuaFile("autorun/client/kontrol.lua")
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
AddCSLuaFile("derma.lua")

include("init.lua")

SQL_ACTIVE = tobool(string.Explode(";", file.Read("../lua/sql.txt"))[1])

local SQL_HOST = string.Explode(";", file.Read("../lua/sql.txt"))[2]
local SQL_USER = string.Explode(";", file.Read("../lua/sql.txt"))[3]
local SQL_PASS = string.Explode(";", file.Read("../lua/sql.txt"))[4]
local SQL_DB = string.Explode(";", file.Read("../lua/sql.txt"))[5]
local SQL_PORT = tonumber(string.Explode(";", file.Read("../lua/sql.txt"))[6])

if SQL_ACTIVE then
	require("tmysql")

	hook.Add("Initialize", "LoadSQLConnection", function()
		tmysql.initialize(SQL_HOST, SQL_USER, SQL_PASS, SQL_DB, SQL_PORT)
	end)
end